package com.config;

import com.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2018/11/9 0009.
 */
@Component
public class ScheduledTasks {
    @Autowired
    private LoginService loginService;

    //每一天执行一次
    @Scheduled(cron = "0 0 12 * * ?")
    public void reportCurrentByCron() {
        int success = loginService.findTimedTask();
        System.out.println("定时清理过期formId");
    }

}
